﻿<%@ Page Title="" Language="C#" MasterPageFile="~/iFrameMasterPage.master" AutoEventWireup="true" CodeFile="DiscountList.aspx.cs" Inherits="DiscountList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<table width ="100%" cellpadding ="1" cellspacing ="1" >
    <tr >
        <td style ="width :20px" >            
            <asp:Image ID="Image1" ImageUrl ="~/images/Calendar_scheduleHS.png" runat="server" />
        </td>
        <td style ="text-align :left;font-weight :bold"  >        
            Дисконтные программы
        </td>
        <td style ="text-align :right " >        
                      <asp:LinkButton  ID="LinkButton1"  Width ="150px" runat="server" CssClass="btn" OnClick ="btnAddRecord_Click" OnClientClick ="skm_LockScreen();"  >Новая запись</asp:LinkButton>
        </td>
    </tr>
</table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" Runat="Server">
<asp:UpdatePanel  runat ="server"  ID ="updTable" UpdateMode ="Conditional" >
<ContentTemplate >

    <table style="width: 100%;" cellpadding ="3px" cellspacing ="0">    
        <asp:ListView ID="lvDiscountList" runat="server" onselectedindexchanged="lvDiscountList_SelectedIndexChanged" 
             >
        <LayoutTemplate>    
        <tr>              
                <td  class ="grd_td_item_caption"  >                    
                
                        <table width ="100%" cellpadding  ="0" cellspacing ="0" >
                            <tr >
                                 <td style="width :40px;text-align :center" >           
                                    &nbsp
                                </td>                                
                                 <td style="width :40%">
                                    Наименование
                                </td>
                                 <td  style="width :330px">
                                    Начало
                                </td>                                                
                                 <td  style="width :300px">
                                    Окончание
                                </td>            
                                 <td style="width :300px" >
                                    Тип
                                 </td> 
                                 <td style="width :200px" >
                                     Значение %
                                 </td>                                
                                 
                              </tr>    
                         </table> 
                
                </td> 
            </tr>                                                                                                                
        <tr ID="itemPlaceholder" runat="server">                                                        
        </tr>        
        </LayoutTemplate>
        <EmptyDataTemplate >
        <tr>  
        <td style ="text-align :center " >
            По вашему запросу ничего не найдено
        </td>            
        </tr> 
            
        </EmptyDataTemplate>
        <ItemTemplate>        
            <tr>              
                <td class ="grd_td_item" onmouseover ="GrdItemOnMouseOver(this);" onmouseout ="GrdItemOnMouseOut(this);" onclick="skm_LockScreen();  <%# GetRowClick((string)Eval("ID")) %>" >                    
                        <table width ="100%" cellpadding  ="0" cellspacing ="0" >
                            <tr >
                                 <td style="width :40px;text-align :center" >           
                                    <asp:Image ID="Image2" runat="server"  ImageUrl ="~/images/grippy.png"/>
                                </td>                                
                                 <td style="width :40%">
                                    <%# Eval("Name") %>
                                </td>
                                 <td  style="width :300px">
                                    <%# ((DateTime)Eval("dtStart")).ToShortDateString ()  %>
                                </td>                                                
                                 <td  style="width :300px">
                                    <%# ((DateTime)Eval("dtFinish")).ToShortDateString ()  %>
                                </td>            
                                 <td style="width :300px" >
                                    <%# ((bool)Eval("IsCharge"))?"Начисление":"Скидка" %>
                                 </td> 
                                 <td style="width :200px" >
                                     <%# Eval("Percent") +"%"%>
                                 </td>                                                                 
                              </tr>    
                         </table> 
                </td> 
            </tr> 
        </ItemTemplate> 
        
        </asp:ListView> 
    </table> 
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

